home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / TURB_VIS / XDATE / TESTPLAT.PAS < prev    next >
Pascal/Delphi Source File  |  1992-02-06  |  1KB  |  52 lines

  1. {*****************************************************************}
  2. { Author:        Michael L. Peters                                }
  3. { Date:          February 3, 1992                                 }
  4. { Purpose:       To demonstrate the XDate Unit.                   }
  5. { Copywrite (c): Avialable to the public domain                   }
  6. {                                                                 }
  7. {*****************************************************************}
  8.  
  9. program TestPlatatform;
  10. uses
  11.   Dos, Objects, Drivers, Views, App,
  12.   XDate;                                 
  13.  
  14. type
  15.   { TTestPlatatform }
  16.  
  17.   PTestPlatatform = ^TTestPlatatform;
  18.   TTestPlatatform = object(TApplication)
  19.     Date: PDateView;
  20.     constructor Init;
  21.     procedure Idle; virtual;
  22.   end;
  23.  
  24. constructor TTestPlatatform.Init;
  25. var
  26.   R: TRect;
  27.   I: Integer;
  28. begin
  29.   TApplication.Init;
  30.  
  31. GetExtent(R);
  32.   R.A.X := R.B.X - 15;R.B.Y := R.A.Y + 1;
  33.   Date := New(PdateView, Init(R));
  34.   Insert(date);
  35. end;
  36.  
  37. procedure TTestPlatatform.Idle;
  38.  
  39. begin
  40.   TApplication.Idle;
  41.   date^.Update;
  42. end;
  43.  
  44. var
  45.   Demo: TTestPlatatform;
  46.  
  47. begin
  48.   Demo.Init;
  49.   Demo.Run;
  50.   Demo.Done;
  51. end.
  52.